package com.gqz.equip.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


/**
 * wz装备日志实体
 *
 * @author gqz20
 * @date 2023/02/18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("T_EN_WZ_EQUIP_LOG")
public class EnWzEquipLogEntity implements Serializable {

    /**
     * 设备编码
     */
    @TableField(value = "SBBM")
    private String sbbm;

    /**
     * 设备名称
     */
    @TableField(value = "SBMC")
    private String sbmc;

    /**
     * 管理单位编码
     */
    @TableField(value = "GLDWBM")
    private String gldwbm;

    /**
     * 管理单位名称
     */
    @TableField(value = "GLDWMC")
    private String gldwmc;

    /**
     * 所属能源站编码
     */
    @TableField(value = "SSNYZBM")
    private String ssnyzbm;

    /**
     * 所属能源站名称
     */
    @TableField(value = "SSNYZMC")
    private String ssnyzmc;

    /**
     * 物资类别编码
     */
    @TableField(value = "WZLBBM")
    private String wzlbbm;

    /**
     * 设备类型编码
     */
    @TableField(value = "SBLXBM")
    private String sblxbm;

    /**
     * 计量方式编码
     */
    @TableField(value = "JLFSBM")
    private String jlfsbm;

    /**
     * 规格
     */
    @TableField(value = "SBGG")
    private String sbgg;

    /**
     * 型号
     */
    @TableField(value = "XH")
    private String xh;

    /**
     * 出厂编码
     */
    @TableField(value = "CCBM")
    private String ccbm;

    /**
     * 出厂日期
     */
    @TableField(value = "CCRQ")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "ccrq", format = "yyyy-MM-dd HH:mm:ss")
    private Date ccrq;

    /**
     * pt
     */
    @TableField(value = "PT")
    private String pt;

    /**
     * ct
     */
    @TableField(value = "CT")
    private String ct;

    /**
     * 运行状态编码
     */
    @TableField(value = "YXZT")
    private String yxzt;

    /**
     * 厂家名称
     */
    @TableField(value = "CJMC")
    private String cjmc;

    /**
     * 所属库房编码
     */
    @TableField(value = "SSKFBM")
    private String sskfbm;

    /**
     * 所属库房名称
     */
    @TableField(value = "SSKFMC")
    private String sskfmc;

    /**
     * 创建人
     */
    @TableField(value = "CJR")
    private String cjr;

    /**
     * 创建时间
     */
    @TableField(value = "CJTIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "cjtime", format = "yyyy-MM-dd HH:mm:ss")
    private Date cjtime;

    /**
     * 设备照片
     */
    @TableField(value = "SBZP")
    private String sbzp;

    /**
     * 设备状态编码
     */
    @TableField(value = "SBZTBM")
    private String sbztbm;

    /**
     * 是否删除 0否1是
     */
    @TableField(value = "SFSC")
    private String sfsc;

    /**
     * 是否贴签 0否1是
     */
    @TableField(value = "SFTQ")
    private String sftq;

    /**
     * 物资类别名称
     */
    @TableField(value = "WZLBMC")
    private String wzlbmc;

    /**
     * 设备类型名称
     */
    @TableField(value = "SBLXMC")
    private String sblxmc;

    /**
     * 计量方式名称
     */
    @TableField(value = "JLFSMC")
    private String jlfsmc;

    /**
     * 运行状态
     */
    @TableField(value = "YXZTMC")
    private String yxztmc;

    /**
     * 设备状态名称
     */
    @TableField(value = "SBZTMC")
    private String sbztmc;

    /**
     * 设备上一步状态编码
     */
    @TableField(value = "SBZT_OLD")
    private String sbztOld;

    /**
     * 设备上一步状态名称
     */
    @TableField(value = "SBZT_OLDMC")
    private String sbztOldmc;

    /**
     * 是否检测 0否1是
     */
    @TableField(value = "SFJC")
    private String sfjc;

    /**
     * 二维码
     */
    @TableField(value = "EWM")
    private String ewm;

    /**
     * 投运日期
     */
    @TableField(value = "TYRQ")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "tyrq", format = "yyyy-MM-dd HH:mm:ss")
    private Date tyrq;

    /**
     * 设备地址
     */
    @TableField(value = "SBDZ")
    private String sbdz;

    /**
     * 设备坐标
     */
    @TableField(value = "SBZB")
    private String sbzb;

    /**
     * 所属盘点工单编号
     */
    @TableField(value = "TASK_NO")
    private String taskNo;

    /**
     * 主键
     */
    @TableId
    private String id;

    /**
     * start����Ǳ���Ҫ�Ķ�̬��������start   start
     */
    private static Map<String, SFunction<EnWzEquipLogEntity, ?>> map;

    static {
        map = new HashMap<>();
        map.put("sbbm", EnWzEquipLogEntity::getSbbm);
        map.put("sbmc", EnWzEquipLogEntity::getSbmc);
        map.put("gldwbm", EnWzEquipLogEntity::getGldwbm);
        map.put("gldwmc", EnWzEquipLogEntity::getGldwmc);
        map.put("ssnyzbm", EnWzEquipLogEntity::getSsnyzbm);
        map.put("ssnyzmc", EnWzEquipLogEntity::getSsnyzmc);
        map.put("wzlbbm", EnWzEquipLogEntity::getWzlbbm);
        map.put("sblxbm", EnWzEquipLogEntity::getSblxbm);
        map.put("jlfsbm", EnWzEquipLogEntity::getJlfsbm);
        map.put("sbgg", EnWzEquipLogEntity::getSbgg);
        map.put("xh", EnWzEquipLogEntity::getXh);
        map.put("ccbm", EnWzEquipLogEntity::getCcbm);
        map.put("ccrq", EnWzEquipLogEntity::getCcrq);
        map.put("pt", EnWzEquipLogEntity::getPt);
        map.put("ct", EnWzEquipLogEntity::getCt);
        map.put("yxzt", EnWzEquipLogEntity::getYxzt);
        map.put("cjmc", EnWzEquipLogEntity::getCjmc);
        map.put("sskfbm", EnWzEquipLogEntity::getSskfbm);
        map.put("sskfmc", EnWzEquipLogEntity::getSskfmc);
        map.put("cjr", EnWzEquipLogEntity::getCjr);
        map.put("cjtime", EnWzEquipLogEntity::getCjtime);
        map.put("sbzp", EnWzEquipLogEntity::getSbzp);
        map.put("sbztbm", EnWzEquipLogEntity::getSbztbm);
        map.put("sfsc", EnWzEquipLogEntity::getSfsc);
        map.put("sftq", EnWzEquipLogEntity::getSftq);
        map.put("wzlbmc", EnWzEquipLogEntity::getWzlbmc);
        map.put("sblxmc", EnWzEquipLogEntity::getSblxmc);
        map.put("jlfsmc", EnWzEquipLogEntity::getJlfsmc);
        map.put("yxztmc", EnWzEquipLogEntity::getYxztmc);
        map.put("sbztmc", EnWzEquipLogEntity::getSbztmc);
        map.put("sbztOld", EnWzEquipLogEntity::getSbztOld);
        map.put("sbztOldmc", EnWzEquipLogEntity::getSbztOldmc);
        map.put("sfjc", EnWzEquipLogEntity::getSfjc);
        map.put("ewm", EnWzEquipLogEntity::getEwm);
        map.put("tyrq", EnWzEquipLogEntity::getTyrq);
        map.put("sbdz", EnWzEquipLogEntity::getSbdz);
        map.put("sbzb", EnWzEquipLogEntity::getSbzb);
        map.put("taskNo", EnWzEquipLogEntity::getTaskNo);
        map.put("id", EnWzEquipLogEntity::getId);

    }

    public static SFunction<EnWzEquipLogEntity, ?> genColumnSFunction(String column) {
        return map.get(column);
    }
    /** end����Ǳ���Ҫ�Ķ�̬��������end   end */


}
